package com.ehotting.edsta.system.api;

import com.ehotting.eaf.core.constant.SecurityConstants;
import com.ehotting.eaf.core.constant.ServiceNameConstants;
import com.ehotting.eaf.core.domain.R;
import com.ehotting.eaf.core.web.domain.AjaxResult;
import com.ehotting.eaf.core.domain.system.api.SysUser;
import com.ehotting.edsta.system.api.factory.RemoteDictFallbackFactory;
import com.ehotting.edsta.system.api.factory.RemoteUserFallbackFactory;
import com.ehotting.eaf.core.domain.model.LoginUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 用户服务
 * 
 * @author edsta
 */
@FeignClient(contextId = "remoteDictService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteDictFallbackFactory.class)
public interface RemoteDictService
{
    /**
     * 通过字典类型查询字典数据
     *
     * @param dictType 字典类型
     * @param source 请求来源
     * @return 结果
     */
    @GetMapping("/dict/data/type/{dictType}")
    AjaxResult dictType(@PathVariable("dictType") String dictType, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

  }
